package ec.edu.uce.tour.web.menu.componente;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.primefaces.model.menu.MenuElement;
import org.primefaces.model.menu.Submenu;

public class DefaultSubMenuSlideDown implements Submenu, Serializable {
    
    private String id;
    private String style;
    private String styleClass;
    private String icon;
    private String label;
    private String valueTitle;
    private String valueDesc;
    
    private List<MenuElement> elements;
    private boolean rendered = true;
    
    public DefaultSubMenuSlideDown() {
        elements = new ArrayList<MenuElement>();
    }
    
    
    public DefaultSubMenuSlideDown(String label, String icon) {
        this.label = label;
        this.icon = icon;
        elements = new ArrayList<MenuElement>();
    }

    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }

    public String getStyle() {
        return style;
    }
    public void setStyle(String style) {
        this.style = style;
    }

    public String getStyleClass() {
        return styleClass;
    }
    public void setStyleClass(String styleClass) {
        this.styleClass = styleClass;
    }

    public String getIcon() {
        return icon;
    }
    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getLabel() {
        return label;
    }
    public void setLabel(String label) {
        this.label = label;
    }

    public List<MenuElement> getElements() {
        return elements;
    }

    public void setElements(List<MenuElement> elements) {
        this.elements = elements;
    } 
    
    public int getElementsCount() {
        return (elements == null) ? 0 : elements.size();
    }
    
    public boolean isRendered() {
        return rendered;
    }
    public void setRendered(boolean rendered) {
        this.rendered = rendered;
    }

    public Object getParent() {
        return null;
    }
    
    public void addElement(MenuElement element) {
        elements.add(element);
    }


	/**
	 * @return the valueTitle
	 */
	public String getValueTitle() {
		return valueTitle;
	}


	/**
	 * @param valueTitle the valueTitle to set
	 */
	public void setValueTitle(String valueTitle) {
		this.valueTitle = valueTitle;
	}


	/**
	 * @return the valueDesc
	 */
	public String getValueDesc() {
		return valueDesc;
	}


	/**
	 * @param valueDesc the valueDesc to set
	 */
	public void setValueDesc(String valueDesc) {
		this.valueDesc = valueDesc;
	}
}
